/*
 * TestLogPlots.java
 *
 * Created on June 3, 2008, 11:48 AM
 */

package specto.transformer;

import specto.euclidean2.Point2D;
import specto.euclidean2.Euclidean2;
import specto.euclidean2.Function2D;

/**
 *
 * @author  ae3263
 */
public class TestLogPlots extends javax.swing.JFrame {

    /** Creates new form TestLogPlots */
    public TestLogPlots() {
        initComponents();
        LogVisometry logVis = new LogVisometry(plot2D1);
        TransformedGroup<Euclidean2,Euclidean2> logGroup = new TransformedGroup<Euclidean2,Euclidean2>(logVis);
        Point2D pt = new Point2D(3,3);
        plot2D1.add(pt);
        logGroup.addTransforming(new Function2D("exp(x)"));        
        logGroup.addTransforming(new Point2D(pt.getModel()));
        plot2D1.add(logGroup);
        plot2D1.add(new Function2D("x^2/10"));
        
        logPlot2D1.add(new Function2D("x"));
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        plot2D1 = new specto.euclidean2.Plot2D();
        logPlot2D1 = new specto.transformer.LogPlot2D();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        javax.swing.GroupLayout plot2D1Layout = new javax.swing.GroupLayout(plot2D1);
        plot2D1.setLayout(plot2D1Layout);
        plot2D1Layout.setHorizontalGroup(
            plot2D1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        plot2D1Layout.setVerticalGroup(
            plot2D1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 162, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout logPlot2D1Layout = new javax.swing.GroupLayout(logPlot2D1);
        logPlot2D1.setLayout(logPlot2D1Layout);
        logPlot2D1Layout.setHorizontalGroup(
            logPlot2D1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        logPlot2D1Layout.setVerticalGroup(
            logPlot2D1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 200, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(plot2D1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
            .addComponent(logPlot2D1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(plot2D1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(logPlot2D1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TestLogPlots().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private specto.transformer.LogPlot2D logPlot2D1;
    private specto.euclidean2.Plot2D plot2D1;
    // End of variables declaration//GEN-END:variables

}
